package com.z100h.supplychain.evidence.entity;

import java.util.List;

import com.alibaba.fastjson.JSONObject;
import com.jeeplus.common.utils.excel.annotation.ExcelField;
import com.jeeplus.core.persistence.DataEntity;
import com.z100h.supplychain.core.Evidence;
import com.z100h.supplychain.core.EvidenceType;

/**
 * 入库单实体
 */
public class WarehouseReceipt extends DataEntity<WarehouseReceipt> implements Evidence {

	private static final long serialVersionUID = 1L;

	private String receiptNo; // 入库单号

	private String state; // 状态

	private String receiptType; // 入库类型

	private String warehouseId; // 仓库id

	private String purchaseOrderId; // 采购单id 可以不关联

	private String poId;// purchaseOrderId,防止异常

	private String purchaseDate;

	private String warehouseName;

	private String purchaseNo;// evidence_id

	private String totalPlant;

	private String confirmTotal;

	private String startDate;

	private String endDate;

	private List<String> resourceIds;

	JSONObject warehouseReceiptJson;

	private String jsons;

	public String getJsons() {
		return jsons;
	}

	public void setJsons(String jsons) {
		this.jsons = jsons;
	}

	private String skuName;

	// private String resourceCode;

	public List<String> getResourceIds() {
		return resourceIds;
	}

	public void setResourceIds(List<String> resourceIds) {
		this.resourceIds = resourceIds;
	}

	@ExcelField(title = "sku名称", align = 2, sort = 9)
	public String getSkuName() {
		return skuName;
	}

	public void setSkuName(String skuName) {
		this.skuName = skuName;
	}

	// @ExcelField(title = "ifid", align = 2, sort = 9)
	// public String getResourceCode() {
	// return resourceCode;
	// }
	//
	// public void setResourceCode(String resourceCode) {
	// this.resourceCode = resourceCode;
	// }

	public JSONObject getWarehouseReceiptJson() {
		return warehouseReceiptJson;
	}

	public void setWarehouseReceiptJson(JSONObject warehouseReceiptJson) {
		this.warehouseReceiptJson = warehouseReceiptJson;
	}

	private String evidenceId;// 凭证id

	public String getReceiptNo() {
		return receiptNo;
	}

	public void setReceiptNo(String receiptNo) {
		this.receiptNo = receiptNo;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public String getReceiptType() {
		return receiptType;
	}

	public void setReceiptType(String receiptType) {
		this.receiptType = receiptType;
	}

	public String getWarehouseId() {
		return warehouseId;
	}

	public void setWarehouseId(String warehouseId) {
		this.warehouseId = warehouseId;
	}

	public String getPurchaseOrderId() {
		return purchaseOrderId;
	}

	public void setPurchaseOrderId(String purchaseOrderId) {
		this.purchaseOrderId = purchaseOrderId;
	}

	public String getWarehouseName() {
		return warehouseName;
	}

	public void setWarehouseName(String warehouseName) {
		this.warehouseName = warehouseName;
	}

	public String getPurchaseNo() {
		return purchaseNo;
	}

	public void setPurchaseNo(String purchaseNo) {
		this.purchaseNo = purchaseNo;
	}

	public String getTotalPlant() {
		return totalPlant;
	}

	public void setTotalPlant(String totalPlant) {
		this.totalPlant = totalPlant;
	}

	public String getConfirmTotal() {
		return confirmTotal;
	}

	public void setConfirmTotal(String confirmTotal) {
		this.confirmTotal = confirmTotal;
	}

	@Override
	public String getEvidenceId() {
		return evidenceId;
	}

	public void setEvidenceId(String evidenceId) {
		this.evidenceId = evidenceId;
	}

	public WarehouseReceipt() {
		super();
	}

	public WarehouseReceipt(String evidenceId) {
		super();
		this.evidenceId = evidenceId;
	}

	public String getStartDate() {
		return startDate;
	}

	public void setStartDate(String startDate) {
		this.startDate = startDate;
	}

	public String getEndDate() {
		return endDate;
	}

	public void setEndDate(String endDate) {
		this.endDate = endDate;
	}

	/**
	 * {@inheritDoc}
	 * 
	 * @see java.lang.Object#toString()
	 * @author: Elvin Zhao - 279152260@qq.com 
	 * @date: Created on 2019年4月9日 上午11:05:38
	 */
	@Override
	public String toString() {
		return "WarehouseReceipt [receiptNo=" + receiptNo + ", state=" + state + ", receiptType=" + receiptType
				+ ", warehouseId=" + warehouseId + ", purchaseOrderId=" + purchaseOrderId + ", warehouseName="
				+ warehouseName + ", purchaseNo=" + purchaseNo + ", totalPlant=" + totalPlant + ", confirmTotal="
				+ confirmTotal + ", startDate=" + startDate + ", endDate=" + endDate + ", resourceIds=" + resourceIds
				+ ", warehouseReceiptJson=" + warehouseReceiptJson + ", jsons=" + jsons + ", skuName=" + skuName
				+ ", evidenceId=" + evidenceId + "]";
	}

	public String getPoId() {
		return poId;
	}

	public void setPoId(String poId) {
		this.poId = poId;
	}

	public String getPurchaseDate() {
		return purchaseDate;
	}

	public void setPurchaseDate(String purchaseDate) {
		this.purchaseDate = purchaseDate;
	}

	/**
	 * @param receiptType
	 */
	public WarehouseReceipt(EvidenceType evidenceType) {
		super();
		this.receiptType = evidenceType.getType();
	}

}
